<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="countryForm.title"/></title>
    <meta name="heading" content="<fmt:message key='countryForm.heading'/>"/>
    <meta name="menu" content="CommodityTypeFormMenu"/>
    <script type="text/javascript" src="<c:url value='/scripts/selectbox.js'/>"></script>
</head>

<c:set var="buttons">
	<input type="submit" class="button" name="save" onclick="bCancel=false" value="<fmt:message key="button.save"/>"/>

	<c:if test="${param.from == 'list' and param.method != 'Add'}">
		<input type="submit" class="button" name="delete" onclick="bCancel=true;return confirmDelete('CommodityType Data')"
	         value="<fmt:message key="button.delete"/>"/>
	</c:if>

    <input type="submit" class="button" name="cancel" onclick="bCancel=true" value="<fmt:message key="button.cancel"/>"/>
</c:set>

<form:form commandName="commodityType" method="post" action="commodityTypeForm.html" onsubmit="return onFormSubmit(this)" id="commodityTypeForm">
	<form:hidden path="id"/>
    <li class="buttonBar right">
        <%-- So the buttons can be used at the bottom of the form --%>
        <c:out value="${buttons}" escapeXml="false"/>
    </li>
	
    <li>
        <appfuse:label styleClass="desc" key="commodityTypeData.code"/>
        <form:errors path="code" cssClass="fieldError"/>
        <form:input path="code" id="commodityTypeCode" cssClass="text large" cssErrorClass="text large error"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="commodityTypeData.name"/>
        <form:errors path="name" cssClass="fieldError"/>
        <form:input path="name" id="commodityTypeName" cssClass="text large" cssErrorClass="text large error"/>
    </li>

    <li class="buttonBar right">
        <%-- So the buttons can be used at the bottom of the form --%>
        <c:out value="${buttons}" escapeXml="false"/>
    </li>
</form:form>